package cn.javaeye.lonlysky.lforum.entity.web;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "t_parenttype")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ParentType implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4781514726917259620L;
	private Integer id;
	private String name;
	private Integer order=0;
	private FartherType fartherType;

	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "increment")
	@Column(name = "id", unique = true, nullable = false, insertable = true, updatable = true)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * 模块名字
	 */
	
	@Column(name = "name", unique = false, nullable = false, insertable = true, updatable = true)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "fid", unique = false, nullable = true, insertable = true, updatable = true)

	public FartherType getFartherType() {
		return fartherType;
	}
	public void setFartherType(FartherType fartherType) {
		this.fartherType = fartherType;
	}
	/**
	 * 排序
	 */
	
	@Column(name = "orders", unique = true, nullable = false, insertable = true, updatable = true)
	public Integer getOrder() {
		return order;
	}
	public void setOrder(Integer order) {
		this.order = order;
	}

	
}
